{% extends 'base.html' %}
{% load tags %}

{% block body %}
    <body>

    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                        aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand">Student CRM</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="#">{{ request.user.name }}</a></li>
                    <li><a href="http://v3.bootcss.com/examples/dashboard/#">修改密码</a></li>
                    <li><a href="{% url 'acc_logout' %}">注销</a></li>
                    <li><a href="http://v3.bootcss.com/examples/dashboard/#">Help</a></li>
                </ul>
            </div>
        </div>
    </nav>
        <div class="container" style="margin: 50px; width: auto;min-width: 1300px">
        {% block container %}
            <div class="row">
                <div class="panel panel-info">
                    {% for app_name,app_tables in table_list.items %}
                        <div class="panel-heading">{{ app_name }}</div>
                        <div class="panel-body">
                            <table class="table table-hover">
                                <thead>
                                <tr>
                                    <th>

                                    </th>
                                </tr>
                                </thead>
                                <tbody>
                                {% for table_name,admin in app_tables.items %}
                                    <tr>
                                        <td>
                                            <a href="{% url 'table_obj' app_name table_name %}">
                                                {% render_app_name admin %}
                                            </a>
                                        </td>
                                        <td>add</td>
                                        <td>change</td>
                                    </tr>
                                {% endfor %}
                                </tbody>
                            </table>
                        </div>
                    {% endfor %}
                </div>
            </div>
        {% endblock %}
        </div>


    {#<div id="qb-sougou-search" style="display: none; opacity: 0;"><p>搜索</p><p class="last-btn">复制</p><iframe src="./Dashboard Template for Bootstrap_files/saved_resource.html"></iframe></div></body>#}
{% endblock %}